package com.maoyongqi.controller;

import com.maoyongqi.config.MySpringConfigurator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;

@Component
@ServerEndpoint(value = "/socket",configurator = MySpringConfigurator.class)
public class WebSocketServer {

    @OnOpen
    public void Onopen(Session session){
        System.out.println("一位用户进入连接" + session.getId());
    }



}
